home *** CD-ROM | disk | FTP | other *** search
- program cursor; {from October 29, 1985 PC Magazine page 217, works
- on PC/MS-dos machines only, TurboPascal v2
- }
-
- var top,bottom : byte;
- ch : char;
-
- Procedure set_cursor (top,bottom : byte; curon : boolean);
-
- var vport : integer;
-
- begin
- vport := memw[$0040:$0063];
- if not curon then top := top or 32;
- port[vport] := 10; port[vport+1] := top;
- port[vport] := 11; port[vport+1] := bottom
- end; { procedure set_cursor (top,bottom : byte; curon : boolean); }
-
- begin
- write('Do you want the cursor to disappear?(y/n): ');
- read(ch);
- writeln;
- if ch in ['N', 'n']
- then begin
- write('Enter top line of cursor (0-13): ');
- readln(top);
- write('Enter bottom line of cursor (0-13): ');
- readln(bottom);
- set_cursor(top,bottom,true)
- end
- else set_cursor(top,bottom,false)
-
- end.